package com.platform.dao.mybatis.impl;

import com.platform.dao.OperateLogDao;
import com.platform.dao.mybatis.mapper.OperateLogMapper;
import com.platform.domain.model.OperateLog;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
* OperateLog
*
* User: wangyang
* DateTime: 2012-10-08 16:11:49
*
*/
@Service("operateLogDao")
public class OperateLogDaoImpl implements OperateLogDao {

    @Resource
    private OperateLogMapper operateLogMapper;

    /**
    *
    * 根据主键查询OperateLog对象
    *
    * @param logId
    * @return OperateLog对象
    */
    @Override
    public OperateLog selectByPrimaryKey(String logId) throws Exception {
        return operateLogMapper.selectByPrimaryKey(logId);
    }

    /**
    *
    * 根据查询条件查询符合条件的OperateLog对象
    *
    * @param operateLog
    * @return 符合条件的OperateLog对象List
    */
    @Override
    public List<OperateLog> select(OperateLog operateLog) throws Exception {
        return operateLogMapper.select(operateLog);
    }

    /**
    *
    * 根据主键删除OperateLog对象
    *
    * @param logId
    * @return 影响条件数
    */
    @Override
    public int deleteByPrimaryKey(String logId) throws Exception {
        return operateLogMapper.deleteByPrimaryKey(logId);
    }

    /**
    *
    * 根据条件删除符合条件的OperateLog对象
    *
    * @param operateLog
    * @return 影响条件数
    */
    @Override
    public int delete(OperateLog operateLog) throws Exception {
        return operateLogMapper.delete(operateLog);
    }

    /**
    *
    * 插入OperateLog对象
    *
    * @param operateLog
    * @return 影响条件数
    */
    @Override
    public int insert(OperateLog operateLog) throws Exception {
        return operateLogMapper.insert(operateLog);
    }

    /**
    *
    * 更新OperateLog对象
    *
    * @param operateLog
    * @return 影响条件数
    */
    @Override
    public int update(OperateLog operateLog) throws Exception {
        return operateLogMapper.update(operateLog);
    }
}
